package com.zy.dp.iterator.example7;

public class SalaryManager
{
	private PayModel[] pms = null;

	public PayModel[] getPays()
	{

		return pms;
	}

	public void calcSalary()
	{

		PayModel pm1 = new PayModel();
		pm1.setPay(3500);
		pm1.setUserName("王五");

		PayModel pm2 = new PayModel();
		pm2.setPay(5500);
		pm2.setUserName("赵六");

		PayModel pm3 = new PayModel();
		pm3.setPay(5400);
		pm3.setUserName("张龙");

		PayModel pm4 = new PayModel();
		pm4.setPay(3700);
		pm4.setUserName("赵虎");

		PayModel pm5 = new PayModel();
		pm5.setPay(5800);
		pm5.setUserName("王超");

		pms = new PayModel[5];
		pms[0] = pm1;
		pms[1] = pm2;
		pms[2] = pm3;
		pms[3] = pm4;
		pms[4] = pm5;
	}

	public AggregationIterator createIterator()
	{
		return new ArrayIteratorImpl(this);
	}

}
